package cn.geminis.workflow.service.entity.repository;

import jakarta.transaction.Transactional;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

/**
 * @author Allen
 */
public interface ApproveResultRepository {

    /**
     * 删除流程实例审批信息
     *
     * @param processInstanceId 流程实例ID
     * @return 删除数量
     */
    @Modifying
    @Transactional(rollbackOn = Exception.class)
    @Query("delete from ApproveResult o where o.processInstanceId = ?1")
    int deleteByProcessInstanceId(String processInstanceId);

}
